package leetcode.BinarySearch;

public class SearchRange {
    public static int[] searchRange(int[] nums, int target) {
        int i = 0;
        int j = nums.length - 1;
        int[] result = {};
        while (i < j) {
            int m = (i + j) / 2;
            if (nums[m] == target) { //那个大 那个方向一定存在峰值
                result[0] = m;
                result[1] = m;
            } else if (nums[m] > target) {
                i = m + 1;
            } else {
            }


        }
        return null;
    }

    public static void main(String[] args) {
        int[] nums = {1, 8, 2, 3, 4, 5, 0};
        System.out.println(searchRange(nums, 8));
    }

}
